package com.api.springdemo.controller;

import com.api.springdemo.entity.Hero;
import com.api.springdemo.service.HeroService;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;

/**
 * (Hero)表控制层
 *
 * @author makejava
 * @since 2025-09-19 16:34:56
 */
@RestController
@RequestMapping("hero")
public class HeroController {
    /**
     * 服务对象
     */
    @Resource
    private HeroService heroService;


    @GetMapping("get")
    public String getById(Integer id){
        return heroService.getById(id).toString();
    }
    @GetMapping("getByName")
    public List<Hero> getList(String name){
        return heroService.getListByName(name);
    }
    @GetMapping("test")
    public String test(){
        return "jenkins + docker 部署成功";
    }
    @GetMapping("dockerbuildimages")
    public String dockerbuildimages(){
        return "jenkins + docker 打包镜像部署成功";
    }

}

